#ifndef TABLE_H
#define TABLE_H
#define MAX_LOOSE_ITEMS  ( 13 )
#include <iostream>
#include <vector>
#include "Card.H"
#include "EventActor.H"
#include "House.H"
#include "Player.H"

class Deck;
class Table: public EventActor
{
    public:
        Table( int numHouse=2 );
        std::vector<Card*> *GetLooseCards() { return &mLooseCards; }
        void PickLooseCards( int Rank );
        void AddLooseCard ( std::vector<Card*> *list );
        void RegisterPlayer ( Player *p );
        void Start( Player *startingPlayer);
        void ProcessEventQueue() ;

    private:
        int mNumHouses;
        std::vector<House*> mHouse;
        std::vector<Card*> mLooseCards;
        std::vector<Player*> mPlayers;
        Player *mCurrentPlayer;
        Player *mStartPlayer;
        Deck *mDeck;
    private:
        void NotifyAll( Event *e );
        void FreshDeal();

};
#endif //#ifndef TABLE_H

/*


   class Gm
   {
   Table mTable;
   public:
   Gm() {};
   RegisterPlayer ( Player *p, int Team );
   Play( )
   {
   for () //each player in p
   RunPlay( P[i] );
   a = getDealer();
   b = a->right(); // b is right of a
   a->Deal();
   b->MakeHouse();
   a->Deal();
   c = b->next();
   c->YourTurn();
   }
   }*/
